package com.jml.核心注解002.config;


import com.jml.核心注解002.entity.Win7Entity;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

/**
 * @author:jml
 * @date: 2019/9/23 9:45
 * @description：
 */
@Configuration
public class MyConfig001 {

    //注解Conditional：表示注册到容器的条件，满足就注册，不满足就不注册
    @Bean
    @Conditional(MyCondition.class)
    public Win7Entity win7Entity() {
        return new Win7Entity();
    }

    @Bean
    public MyFactoryBean myFactoryBean(){
        return new MyFactoryBean();
    }
}
